{% extends 'layout.html' %}

{% block content %}

    {# 这个下边是表格的内容#}
    <div class="container">
        <div style="margin-bottom: 6px">
            <a class="btn btn-success" href="/city/add/" target="_blank">
                <span class="glyphicon glyphicon-screenshot" aria-hidden="true"></span>
                新建城市</a>
        </div>

        <div class="panel panel-default">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                城市列表
            </div>

            <!-- Table -->
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>Logo</th>
                    <th>名称</th>
                    <th>员工数量</th>

                </tr>
                </thead>
                <tbody>
                <tr>
                    {% for obj in queryset %}
                        <th>{{ obj.id }}</th>
                        <td>
                        <img src="/media/{{ obj.img }} " style="width: 50px;height: 30px">
                        </td>
{#                        <td>{{ obj.img }}</td>#}
                        <td>{{ obj.name }}</td>
                        <td>{{ obj.count }}</td>

                        </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>

    </div>

    </div>
{% endblock %}
